<template>
	<view class="myTask">
		<view class="myTask">
			<view class="myTask-list">
				<view class="myTask-list-item" v-for="item in detailList" @click="getDetail(item)">
					<view class="myTask-list-item-title"><text class="title1">账号: </text>{{item.name}}</view>
					<view class="myTask-list-item-title"><text class="title1">操作员: </text>{{item.name1}}</view>
					<view class="myTask-list-item-title"><text class="title1">车辆类型: </text>{{item.name2}}</view>
					<view class="myTask-list-item-title"><text class="title1">任务状态: </text>{{item.name3}}</view>
					<view class="myTask-list-item-time">
						{{item.createTime | dateformat('yyyy-MM-DD  HH:mm') }}
					</view>
				</view>
			</view>
		</view>
		<u-loading-page :loading="isShowLoading" bg-color="rgba(4,4,15,0.4000)">加载中...</u-loading-page>
	</view>
</template>

<script>
	import { getOperationRecordsList } from "@/api/otherTaskApi.js";
	export default {
		data() {
			return {
				detailList:[],
				isShowLoading:false
			}
		},
		onLoad() {

		},
		onShow() {
			this.getOperationRecordsList();
		},
		methods: {
			async getOperationRecordsList(){
				this.isShowLoading = true;
				let res = await getOperationRecordsList();
				if(res.code==200){
					
					this.isShowLoading = false;
				}else{
					this.isShowLoading = false;
					uni.showToast({ title: res.msg, icon: 'none' })
				}
			}
		}
	}
</script>

<style lang="scss">
	page{background:#F2F2F2 ;width:100%;}
	.myTask{
		&-list{
			padding-bottom:100rpx;
			width:690rpx;
			margin:0 auto;
			&-item{
				width:100%;
				// height:150rpx;
				background:white;
				border-radius: 24rpx;
				margin-top:20rpx;
				overflow: hidden;
				position: relative;
				.title1{
					font-weight: 600;
					font-size: 30rpx;
					margin-right:15rpx;
				}
				&-title{
					width:70%;
					white-space: nowrap;
					text-overflow: ellipsis;
					overflow: hidden;
					font-weight: 400;
					font-size: 30rpx;
					margin-top:20rpx;
					padding:10rpx 30rpx;
				}
				&-time{
					font-weight: 400;
					font-size: 26rpx;
					color: #cacaca;
					padding:10rpx 30rpx;
					text-align: right;
				}
				&-urgent{
					position: absolute;
					top:0;
					right:0;
					padding:15rpx;
					background:red;
					color: white;
					font-size: 26rpx;
					border-radius: 0 0 0 24rpx;
				}
			}
		}
	}
</style>